<template>
  <div id="app">
    <!--<img src="./assets/logo.png">-->
    <router-view/>
    <!--<el-row>-->
      <!--<el-button @click="jumpToCustomer('1')">el-button</el-button>-->
    <!--</el-row>-->

  </div>
</template>

<script>
export default {
  name: 'App',
  methods : {
    jumpToCustomer (param) {
      let codeUrl = window.location.search;
      let url = '/hello?param=' + param;
      if(codeUrl != null){
        url += '&code=' + this.parseAndGetCode(codeUrl);
      }else {
        url += '&code=empty';
      }
      this.$router.push({path: url})
    },
    parseAndGetCode (url){
      let reg = new RegExp("(^|&)code=([^&]*)(&|$)");
      let matchResult = url.substr(1).match(reg);
      if(matchResult != null){
        return decodeURIComponent(matchResult[2]);
      }else {
        return null;
      }
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
